<!DOCTYPE html>
<html lang="zh-cn"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><script src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/ca-pub-4210569241504288.js"></script><script type="text/javascript" src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/encoder.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Python 利用pytesser模块识别图像文字 - bbking - 博客园</title>
<link type="text/css" rel="stylesheet" href="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/blog-common.css">
<link id="MainCss" type="text/css" rel="stylesheet" href="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/bundle-kubrick.css">
<link id="mobile-style" media="only screen and (max-width: 768px)" type="text/css" rel="stylesheet" href="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/bundle-kubrick-mobile.css">
<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/chenbjin/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/chenbjin/rsd.xml">
<link type="application/wlwmanifest+xml" rel="wlwmanifest" href="http://www.cnblogs.com/chenbjin/wlwmanifest.xml">
<script src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/jquery.js" type="text/javascript"></script>  
<script type="text/javascript">var currentBlogApp = 'chenbjin', cb_enable_mathjax=false;var isLogined=false;</script>
<script src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/blog-common.js" type="text/javascript"></script>
</head>
<body>
<a name="top"></a>

<div id="header">
    
<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/chenbjin/">bbking</a></h1>
<p id="tagline">My angel love sunshine！</p>
</div>
<div id="wrapper">
<div id="main">
    
<div id="post_detail">
	<div class="post">
		<h2>
			<a id="cb_post_title_url" href="http://www.cnblogs.com/chenbjin/p/4147564.html">Python 利用pytesser模块识别图像文字</a>
		</h2>
		<div class="postText"><div id="cnblogs_post_body"><p>　　使用的是python的pytesser模块，原先想做的是图片中文识别，搞了一段时间了，在中文的识别上还是有很多问题，这里做记录分享。</p>
<p>　　<strong><a href="https://code.google.com/p/pytesser/" target="_blank">pytesser</a>，</strong><span>OCR in Python using the Tesseract engine from Google。是谷歌OCR开源项目的一个模块，<a id="project_summary_link" href="https://code.google.com/p/pytesser/"></a></span>可将图片中的文字转换成文本（主要是英文）。</p>
<p>　　<strong>1.pytesser安装</strong><strong><br></strong></p>
<p><strong>　　使用设备：win8 64位</strong></p>
<p><strong>　　</strong>PyTesser<span><span>使用<span>Tesseract OCR<span>引擎，将<span>图像<span><span>转换<span>到可<span><span>接受的格式，然后<span><span>执行tesseract提取出文本信息<span><span><span><span><span class="high-light-bg">。使用PyTesser ，你无须安装Tesseract OCR引擎,但必须要先安装PIL模块（Python Image Library，python的图形库）<span><br></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p>　　pytesser下载：<a href="http://code.google.com/p/pytesser/">http://code.google.com/p/pytesser/</a>&nbsp; 若打不开，可通过百度网盘下载：<a href="http://pan.baidu.com/s/1o69LL8Y" target="_blank">http://pan.baidu.com/s/1o69LL8Y</a></p>
<p>　　PIL官方下载：<a href="http://www.pythonware.com/products/pil/">http://www.pythonware.com/products/pil/</a></p>
<p>　　其中PIL可直接点击exe安装，pytesser无需安装，解压后可以放在python安装文件夹的\Lib\site-packages\ &nbsp;下直接使用（需要添加pytesser.pth）</p>
<p>　　<strong>Ubuntu安装</strong></p>
<div class="cnblogs_code">
<pre><span style="color: #0000ff;">sudo</span> pip <span style="color: #0000ff;">install</span><span style="color: #000000;"> pytesseract
</span><span style="color: #0000ff;">sudo</span> apt-get <span style="color: #0000ff;">install</span> tesseract-ocr</pre>
</div>
<p>　　<strong>2.pytesser源码</strong></p>
<p><strong>　　</strong>通过查看pytesser.py的源码，可以看到几个主要函数：</p>
<pre><span>　（1）call_tesseract(input_filename, output_filename)</span></pre>
<p><span style="font-size: 14px; line-height: 1.5;">　　该函数调用tesseract外部执行程序，提取图片中的文本信息</span>　</p>
<pre>  （2）image_to_string(im, cleanup =<span> cleanup_scratch_flag)</span></pre>
<p>　　该函数处理的是image对象，所以需用使用im = 
open(filename)打开文件，返回一个image对象。其中调用util.image_to_scratch(im, 
scratch_image_name)将内存中的图像文件保存为bmp，以便tesserac程序能正常处理。</p>
<pre>  （3）image_file_to_string(filename, cleanup = cleanup_scratch_flag, graceful_errors=<span>True)</span></pre>
<pre><span>　 该函数直接<span>使用Tesseract读取图像文件，如果图像是不相容的，会先转换成兼容的格式，然后再提取图片中的文本信息。<br></span></span></pre>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #800000;">"""</span><span style="color: #800000;">OCR in Python using the Tesseract engine from Google
http://code.google.com/p/pytesser/
by Michael J.T. O'Kelly
V 0.0.1, 3/10/07</span><span style="color: #800000;">"""</span>

<span style="color: #0000ff;">import</span><span style="color: #000000;"> Image
</span><span style="color: #0000ff;">import</span><span style="color: #000000;"> subprocess

</span><span style="color: #0000ff;">import</span><span style="color: #000000;"> util
</span><span style="color: #0000ff;">import</span><span style="color: #000000;"> errors

tesseract_exe_name </span>= <span style="color: #800000;">'</span><span style="color: #800000;">tesseract</span><span style="color: #800000;">'</span> <span style="color: #008000;">#</span><span style="color: #008000;"> Name of executable to be called at command line</span>
scratch_image_name = <span style="color: #800000;">"</span><span style="color: #800000;">temp.bmp</span><span style="color: #800000;">"</span> <span style="color: #008000;">#</span><span style="color: #008000;"> This file must be .bmp or other Tesseract-compatible format</span>
scratch_text_name_root = <span style="color: #800000;">"</span><span style="color: #800000;">temp</span><span style="color: #800000;">"</span> <span style="color: #008000;">#</span><span style="color: #008000;"> Leave out the .txt extension</span>
cleanup_scratch_flag = False  <span style="color: #008000;">#</span><span style="color: #008000;"> Temporary files cleaned up after OCR operation</span>

<span style="color: #0000ff;">def</span><span style="color: #000000;"> call_tesseract(input_filename, output_filename):
    </span><span style="color: #800000;">"""</span><span style="color: #800000;">Calls external tesseract.exe on input file (restrictions on types),
    outputting output_filename+'txt'</span><span style="color: #800000;">"""</span><span style="color: #000000;">
    args </span>=<span style="color: #000000;"> [tesseract_exe_name, input_filename, output_filename]
    proc </span>=<span style="color: #000000;"> subprocess.Popen(args)
    retcode </span>=<span style="color: #000000;"> proc.wait()
    </span><span style="color: #0000ff;">if</span> retcode!=<span style="color: #000000;">0:
        errors.check_for_errors()

</span><span style="color: #0000ff;">def</span> image_to_string(im, cleanup =<span style="color: #000000;"> cleanup_scratch_flag):
    </span><span style="color: #800000;">"""</span><span style="color: #800000;">Converts im to file, applies tesseract, and fetches resulting text.
    If cleanup=True, delete scratch files after operation.</span><span style="color: #800000;">"""</span>
    <span style="color: #0000ff;">try</span><span style="color: #000000;">:
        util.image_to_scratch(im, scratch_image_name)
        call_tesseract(scratch_image_name, scratch_text_name_root)
        text </span>=<span style="color: #000000;"> util.retrieve_text(scratch_text_name_root)
    </span><span style="color: #0000ff;">finally</span><span style="color: #000000;">:
        </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> cleanup:
            util.perform_cleanup(scratch_image_name, scratch_text_name_root)
    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> text

</span><span style="color: #0000ff;">def</span> image_file_to_string(filename, cleanup = cleanup_scratch_flag, graceful_errors=<span style="color: #000000;">True):
    </span><span style="color: #800000;">"""</span><span style="color: #800000;">Applies tesseract to filename; or, if image is incompatible and graceful_errors=True,
    converts to compatible format and then applies tesseract.  Fetches resulting text.
    If cleanup=True, delete scratch files after operation.</span><span style="color: #800000;">"""</span>
    <span style="color: #0000ff;">try</span><span style="color: #000000;">:
        </span><span style="color: #0000ff;">try</span><span style="color: #000000;">:
            call_tesseract(filename, scratch_text_name_root)
            text </span>=<span style="color: #000000;"> util.retrieve_text(scratch_text_name_root)
        </span><span style="color: #0000ff;">except</span><span style="color: #000000;"> errors.Tesser_General_Exception:
            </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> graceful_errors:
                im </span>=<span style="color: #000000;"> Image.open(filename)
                text </span>=<span style="color: #000000;"> image_to_string(im, cleanup)
            </span><span style="color: #0000ff;">else</span><span style="color: #000000;">:
                </span><span style="color: #0000ff;">raise</span>
    <span style="color: #0000ff;">finally</span><span style="color: #000000;">:
        </span><span style="color: #0000ff;">if</span><span style="color: #000000;"> cleanup:
            util.perform_cleanup(scratch_image_name, scratch_text_name_root)
    </span><span style="color: #0000ff;">return</span><span style="color: #000000;"> text
    

</span><span style="color: #0000ff;">if</span> <span style="color: #800080;">__name__</span>==<span style="color: #800000;">'</span><span style="color: #800000;">__main__</span><span style="color: #800000;">'</span><span style="color: #000000;">:
    im </span>= Image.open(<span style="color: #800000;">'</span><span style="color: #800000;">phototest.tif</span><span style="color: #800000;">'</span><span style="color: #000000;">)
    text </span>=<span style="color: #000000;"> image_to_string(im)
    </span><span style="color: #0000ff;">print</span><span style="color: #000000;"> text
    </span><span style="color: #0000ff;">try</span><span style="color: #000000;">:
        text </span>= image_file_to_string(<span style="color: #800000;">'</span><span style="color: #800000;">fnord.tif</span><span style="color: #800000;">'</span>, graceful_errors=<span style="color: #000000;">False)
    </span><span style="color: #0000ff;">except</span><span style="color: #000000;"> errors.Tesser_General_Exception, value:
        </span><span style="color: #0000ff;">print</span> <span style="color: #800000;">"</span><span style="color: #800000;">fnord.tif is incompatible filetype.  Try graceful_errors=True</span><span style="color: #800000;">"</span>
        <span style="color: #0000ff;">print</span><span style="color: #000000;"> value
    text </span>= image_file_to_string(<span style="color: #800000;">'</span><span style="color: #800000;">fnord.tif</span><span style="color: #800000;">'</span>, graceful_errors=<span style="color: #000000;">True)
    </span><span style="color: #0000ff;">print</span> <span style="color: #800000;">"</span><span style="color: #800000;">fnord.tif contents:</span><span style="color: #800000;">"</span><span style="color: #000000;">, text
    text </span>= image_file_to_string(<span style="color: #800000;">'</span><span style="color: #800000;">fonts_test.png</span><span style="color: #800000;">'</span>, graceful_errors=<span style="color: #000000;">True)
    </span><span style="color: #0000ff;">print</span> text　<strong>　　</strong></pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/copycode.gif" alt="复制代码"></a></span></div></div>
<pre><strong>　　</strong><span style="font-size: 15px;"><strong>3.pytesser使用<br>　　</strong></span>在代码中加载pytesser模块，简单的测试代码如下：</pre>
<div class="cnblogs_code"><div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/copycode.gif" alt="复制代码"></a></span></div>
<pre><span style="color: #0000ff;">from</span> pytesser <span style="color: #0000ff;">import</span> *<span style="color: #000000;">
im </span>= Image.open(<span style="color: #800000;">'</span><span style="color: #800000;">fonts_test.png</span><span style="color: #800000;">'</span><span style="color: #000000;">)
text </span>=<span style="color: #000000;"> image_to_string(im)
</span><span style="color: #0000ff;">print</span> <span style="color: #800000;">"</span><span style="color: #800000;">Using image_to_string(): </span><span style="color: #800000;">"</span>
<span style="color: #0000ff;">print</span><span style="color: #000000;"> text
text </span>= image_file_to_string(<span style="color: #800000;">'</span><span style="color: #800000;">fonts_test.png</span><span style="color: #800000;">'</span>, graceful_errors=<span style="color: #000000;">True)
</span><span style="color: #0000ff;">print</span> <span style="color: #800000;">"</span><span style="color: #800000;">Using image_file_to_string():</span><span style="color: #800000;">"</span>
<span style="color: #0000ff;">print</span> text</pre>
<div class="cnblogs_code_toolbar"><span class="cnblogs_code_copy"><a href="javascript:void(0);" onclick="copyCnblogsCode(this)" title="复制代码"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/copycode.gif" alt="复制代码"></a></span></div></div>
<p>&nbsp;　　<img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/052336254051665.png" alt=""></p>
<p>　识别结果如下：基本能将英文字符提取出来，但对一些复杂点的图片，比如说我尝试对一些英文论文图片进行识别，但结果实在不理想。</p>
<p>　<img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/052339320921797.png" alt=""></p>
<p>　　由于在中文识别方面还有很多问题，以后再进一步研究分享。</p>
<p>&nbsp;</p>
<p>参考：HK_JH的专栏&nbsp;http://blog.csdn.net/hk_jh/article/details/8961449</p></div><div id="MySignature"></div>
<div class="clear"></div>
<div id="blog_post_info_block">
<div id="BlogPostCategory">分类: <a href="http://www.cnblogs.com/chenbjin/category/593860.html" target="_blank">Python</a></div>
<div id="EntryTag"></div>
<div id="blog_post_info"><div id="green_channel">
        <a href="javascript:void(0);" id="green_channel_digg" onclick="DiggIt(4147564,cb_blogId,1);green_channel_success(this,'谢谢推荐！');">好文要顶</a>
            <a id="green_channel_follow" onclick="follow('2b70f66c-11b0-e211-83e8-90b11c0b17d6');" href="javascript:void(0);">关注我</a>
    <a id="green_channel_favorite" onclick="AddToWz(cb_entryId);return false;" href="javascript:void(0);">收藏该文</a>
    <a id="green_channel_weibo" href="javascript:void(0);" title="分享至新浪微博" onclick="ShareToTsina()"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/icon_weibo_24.png" alt=""></a>
    <a id="green_channel_wechat" href="javascript:void(0);" title="分享至微信" onclick="shareOnWechat()"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/wechat.png" alt=""></a>
</div>
<div id="author_profile">
    <div id="author_profile_info" class="author_profile_info">
            <a href="http://home.cnblogs.com/u/chenbjin/" target="_blank"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/20130430210423.jpg" class="author_avatar" alt=""></a>
        <div id="author_profile_detail" class="author_profile_info">
            <a href="http://home.cnblogs.com/u/chenbjin/">bbking</a><br>
            <a href="http://home.cnblogs.com/u/chenbjin/followees">关注 - 9</a><br>
            <a href="http://home.cnblogs.com/u/chenbjin/followers">粉丝 - 33</a>
        </div>
    </div>
    <div class="clear"></div>
    <div id="author_profile_honor"></div>
    <div id="author_profile_follow">
                <a href="javascript:void(0);" onclick="follow('2b70f66c-11b0-e211-83e8-90b11c0b17d6');return false;">+加关注</a>
    </div>
</div>
<div id="div_digg">
    <div class="diggit" onclick="votePost(4147564,'Digg')">
        <span class="diggnum" id="digg_count">1</span>
    </div>
    <div class="buryit" onclick="votePost(4147564,'Bury')">
        <span class="burynum" id="bury_count">0</span>
    </div>
    <div class="clear"></div>
    <div class="diggword" id="digg_tips">
    </div>
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev"><a href="http://www.cnblogs.com/chenbjin/p/4111910.html" class="p_n_p_prefix">« </a> 上一篇：<a href="http://www.cnblogs.com/chenbjin/p/4111910.html" title="发布于2014-11-21 01:58">华为HG255D路由器使用OH3C进行中大校园网认证</a><br><a href="http://www.cnblogs.com/chenbjin/p/4200790.html" class="p_n_p_prefix">» </a> 下一篇：<a href="http://www.cnblogs.com/chenbjin/p/4200790.html" title="发布于2015-01-05 21:35">Python 主成分分析PCA</a><br></div>
</div>

</div>
		<p class="postfoot">
			posted on <span id="post-date">2014-12-05 23:44</span> <a href="http://www.cnblogs.com/chenbjin/">bbking</a> 阅读(<span id="post_view_count">3800</span>) 评论(<span id="post_comment_count">0</span>)  <a href="https://i.cnblogs.com/EditPosts.aspx?postid=4147564" rel="nofollow">编辑</a> <a href="#" onclick="AddToWz(4147564);return false;">收藏</a>
		</p>
	</div>
	<script type="text/javascript">var allowComments=true,cb_blogId=149792,cb_entryId=4147564,cb_blogApp=currentBlogApp,cb_blogUserGuid='2b70f66c-11b0-e211-83e8-90b11c0b17d6',cb_entryCreatedDate='2014/12/5 23:44:00';loadViewCount(cb_entryId);</script>
	
	</div><a name="!comments"></a><div id="blog-comments-placeholder"></div><script type="text/javascript">var commentManager = new blogCommentManager();commentManager.renderComments(0);</script>
<div id="comment_form" class="commentform">
<a name="commentform"></a>
<div id="divCommentShow"></div>
<div id="comment_nav"><span id="span_refresh_tips"></span><a href="javascript:void(0);" onclick="return RefreshCommentList();" id="lnk_RefreshComments" runat="server" clientidmode="Static">刷新评论</a><a href="#" onclick="return RefreshPage();">刷新页面</a><a href="#top">返回顶部</a></div>
<div id="comment_form_container"><div class="login_tips">注册用户登录后才能发表评论，请 <a rel="nofollow" href="javascript:void(0);" class="underline" onclick="return login('commentform');">登录</a> 或 <a rel="nofollow" href="javascript:void(0);" class="underline" onclick="return register();">注册</a>，<a href="http://www.cnblogs.com/">访问</a>网站首页。</div></div>
<div class="ad_text_commentbox" id="ad_text_under_commentbox"></div>
<div id="ad_t2"><a href="http://www.ucancode.com/index.htm" target="_blank">【推荐】50万行VC++源码: 大型组态工控、电力仿真CAD与GIS源码库</a><br><a href="https://group.cnblogs.com/topic/75389.html" target="_blank">【活动】优达学城正式发布“无人驾驶车工程师”课程</a><br><a href="http://rongcloud.cn/reports/journal2" target="_blank">【推荐】融云发布 App 社交化白皮书 IM 提升活跃超 8 倍</a><br><a href="http://www.gcpowertools.com.cn/products/componentone_studio_enterprise.htm?utm_source=cnblogs&amp;utm_medium=blogpage&amp;utm_term=bottom&amp;utm_content=C1&amp;utm_campaign=community" target="_blank">【推荐】别再闷头写代码！找对工具，事半功倍，全能开发工具包用起来</a><br><a href="http://netease.im/?hmsr=bky10&amp;from=bky10" target="_blank">【推荐】网易这个云产品做了15年才面世，1年吸引10万+开发者</a><br></div>
<div id="opt_under_post"></div>
<div id="ad_c1" class="c_ad_block">     <ins class="adsbygoogle" style="display: inline-block; width: 300px; height: 250px;" data-ad-client="ca-pub-4210569241504288" data-ad-slot="5457903683" data-adsbygoogle-status="done"><ins id="aswift_0_expand" style="display:inline-table;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent"><iframe marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;" width="300" height="250" frameborder="0"></iframe></ins></ins></ins></div>
<div id="under_post_news"><div class="itnews c_ad_block"><b>最新IT新闻</b>:<br> ·  <a href="http://news.cnblogs.com/n/555915/" target="_blank">关于硅谷精英的真相：他们和你一样买不起房</a><br> ·  <a href="http://news.cnblogs.com/n/555914/" target="_blank">阿里云发布混合云安全解决方案</a><br> ·  <a href="http://news.cnblogs.com/n/555913/" target="_blank">Windows Server 2016及System Center 2016正式商用</a><br> ·  <a href="http://news.cnblogs.com/n/555912/" target="_blank">创业十年，把六间房卖了26亿的刘岩说：创业是野蛮者的游戏</a><br> ·  <a href="http://news.cnblogs.com/n/555911/" target="_blank">Magic Leap再爆新专利：头戴设备更轻便</a><br>» <a href="http://news.cnblogs.com/" title="IT新闻" target="_blank">更多新闻...</a></div></div>
<div id="ad_c2" class="c_ad_block"><a href="https://www.jiguang.cn/devservice/?from=cnblogs01" target="_blank"><img src="Python%20%E5%88%A9%E7%94%A8pytesser%E6%A8%A1%E5%9D%97%E8%AF%86%E5%88%AB%E5%9B%BE%E5%83%8F%E6%96%87%E5%AD%97%20-%20bbking%20-%20%E5%8D%9A%E5%AE%A2%E5%9B%AD_files/24442-20161011141820868-1378717477.jpg" alt="" width="468" height="60"></a></div>
<div id="under_post_kb"><div class="itnews c_ad_block" id="kb_block"><b>最新知识库文章</b>:<br><div id="kb_recent"> ·  <a href="http://kb.cnblogs.com/page/555750/" target="_blank">循序渐进地代码重构</a><br> ·  <a href="http://kb.cnblogs.com/page/554496/" target="_blank">技术的正宗与野路子</a><br> ·  <a href="http://kb.cnblogs.com/page/553682/" target="_blank">陈皓：什么是工程师文化？</a><br> ·  <a href="http://kb.cnblogs.com/page/551422/" target="_blank">没那么难，谈CSS的设计模式</a><br> ·  <a href="http://kb.cnblogs.com/page/550625/" target="_blank">程序猿媳妇儿注意事项</a><br></div>» <a href="http://kb.cnblogs.com/" target="_blank">更多知识库文章...</a></div></div>
<div id="HistoryToday" class="c_ad_block"><b>历史上的今天:</b><br>2013-12-05 <a href="http://www.cnblogs.com/chenbjin/p/3458705.html">RG100A-AA 中大校园网上网及远程配置</a><br></div>
<script type="text/javascript">
    fixPostBody();
    setTimeout(function () { incrementViewCount(cb_entryId); }, 50);
    deliverAdT2();
    deliverAdC1();
    deliverAdC2();    
    loadNewsAndKb();
    loadBlogSignature();
    LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid);
    GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate);
    loadOptUnderPost();
    GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate);   
</script>
</div>

    
</div>
<div id="rightmenu">
    
        
<h3>公告</h3>
	<div id="blog-news"><!-- 博客园新闻频道引用代码 num-显示条数 -->
<p>中山大学<br>信息科学与技术学院<br>本科<br>
<a href="http://weibo.com/2366865651" target="_blank">新浪微博：@中山大学BBking</a></p><div id="profile_block">昵称：<a href="http://home.cnblogs.com/u/chenbjin/">bbking</a><br>园龄：<a href="http://home.cnblogs.com/u/chenbjin/" title="入园时间：2013-04-28">3年5个月</a><br>粉丝：<a href="http://home.cnblogs.com/u/chenbjin/followers/">33</a><br>关注：<a href="http://home.cnblogs.com/u/chenbjin/followees/">9</a><div id="p_b_follow"><a href="javascript:void(0);" onclick="follow('2b70f66c-11b0-e211-83e8-90b11c0b17d6')">+加关注</a></div></div></div><script type="text/javascript">loadBlogNews();</script>

        
<h3>导航</h3>
<ul>
			<li><a id="blog_nav_sitehome" href="http://www.cnblogs.com/">博客园</a></li>
			<li></li>
			<li><a id="blog_nav_newpost" rel="nofollow" href="https://i.cnblogs.com/EditPosts.aspx?opt=1">新随笔</a></li>
			<li><a id="blog_nav_contact" accesskey="9" rel="nofollow" href="https://msg.cnblogs.com/send/bbking">联系</a></li>
			<li>
			</li><li><a id="blog_nav_admin" rel="nofollow" href="https://i.cnblogs.com/">管理</a></li>
</ul>
        <div id="blog-calendar" style="display:none"></div><script type="text/javascript">loadBlogDefaultCalendar();</script>
        
        <div id="blog-sidecolumn"><div id="sidebar_search" class="sidebar-block"></div><div id="sidebar_categories">
		<h3>随笔分类<span style="font-size:11px;font-weight:normal">(48)</span></h3>
		
				<ul>
			
				<li><a id="CatList_LinkList_0_Link_0" href="http://www.cnblogs.com/chenbjin/category/525023.html">Cocos2d-x(1)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_1" href="http://www.cnblogs.com/chenbjin/category/538507.html">Linux(11)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_2" href="http://www.cnblogs.com/chenbjin/category/531015.html">PHP(4)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_3" href="http://www.cnblogs.com/chenbjin/category/593860.html">Python(12)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_4" href="http://www.cnblogs.com/chenbjin/category/816486.html">机器学习(1)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_5" href="http://www.cnblogs.com/chenbjin/category/482501.html">数据结构(14)</a> </li>
			
				<li><a id="CatList_LinkList_0_Link_6" href="http://www.cnblogs.com/chenbjin/category/757587.html">自然语言处理(5)</a> </li>
			
				</ul>
			
	</div><div id="sidebar_scorerank" class="sidebar-block">
<h3>积分与排名</h3>
<ul>
	<li>
		积分 -
		35310
	</li><li>
		排名 -
		6977
	</li>
</ul>
</div><div id="sidebar_topviewedposts" class="sidebar-block"><div id="topview_posts_wrap">
<h3 class="catListTitle">阅读排行榜</h3>
<div class="RecentComment" id="TopViewPosts"> 
	<div id="TopViewPostsBlock"><ul><li><a href="http://www.cnblogs.com/chenbjin/p/3851165.html">1. Python TF-IDF计算100份文档关键词权重(6957)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/4147564.html">2. Python 利用pytesser模块识别图像文字(3800)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/4060590.html">3. PHP 调用Python脚本(3551)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/3843800.html">4. Python 结巴分词(3364)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/3869745.html">5. Python 手写数字识别-knn算法应用(2022)</a></li></ul></div>
</div>
</div></div><div id="sidebar_topcommentedposts" class="sidebar-block"><div id="topfeedback_posts_wrap">
<h3 class="catListTitle">评论排行榜</h3>
<div class="RecentComment" id="TopCommentsPosts">
	<div id="TopFeedbackPostsBlock"><ul><li><a href="http://www.cnblogs.com/chenbjin/p/3869745.html">1. Python 手写数字识别-knn算法应用(6)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/3851165.html">2. Python TF-IDF计算100份文档关键词权重(5)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/5635853.html">3. Wiki语料处理(4)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/5644457.html">4. word2vec + transE 知识表示模型(2)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/3409934.html">5. PHP生成图片验证码(simple)(2)</a></li></ul></div>
</div></div></div><div id="sidebar_topdiggedposts" class="sidebar-block"><div id="topdigg_posts_wrap">
<h3 class="catListTitle">推荐排行榜</h3>
<div class="RecentComment">
	<div id="TopDiggPostsBlock"><ul><li><a href="http://www.cnblogs.com/chenbjin/p/4976583.html">1. CNN for NLP (CS224D)(3)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/5644457.html">2. word2vec + transE 知识表示模型(3)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/5638904.html">3. Gensim LDA主题模型实验(2)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/4657352.html">4. 数据分析:中国高校更名历史 Python(2)</a></li><li><a href="http://www.cnblogs.com/chenbjin/p/4200790.html">5. Python 主成分分析PCA(1)</a></li></ul></div>
</div></div></div></div><script type="text/javascript">loadBlogSideColumn();</script>
    
</div>
</div>
<div class="clear"></div>

<div id="footer">
	Powered by: 
	<a id="Footer1_Hyperlink3" name="Hyperlink1" href="http://www.cnblogs.com/" style="font-family:Verdana;font-size:12px;">博客园</a>	Copyright © bbking
</div>



</body></html>